import settings
from google.appengine.ext import webapp
from google.appengine.ext.webapp import util
from models import *
import os
from google.appengine.ext.webapp import template

class TimelineHandler(webapp.RequestHandler):

    def get(self):
        path = os.path.join(os.path.dirname(__file__), '../templates/timeline.html')
        self.response.out.write(template.render(path, {
            'title': 'Timeline',
            'section': 'Timeline',
            'milestones': Milestone.all()
        }))


def main():
    application = webapp.WSGIApplication([('/timeline/', TimelineHandler)], 
        debug=True)
    util.run_wsgi_app(application)

if __name__ == '__main__':
    main()
